package uk.co.richardwkirk.parkrun.android.storage;

import uk.co.richardwkirk.parkrun.data.athletes.AthleteSummary;

public class AthleteData {

	protected long id;
	protected String name;
	protected String club;
	protected String data;

	public AthleteData() {
	}
	
	public AthleteData(long id, String name, String club, String data) {
		this.id = id;
		this.name = name;
		this.club = club;
		this.data = data;
	}
	
	public long getId() {
		return id;
	}

	public void setId(long l) {
		this.id = l;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}
	
	public String getClub() {
		return club;
	}

	public void setClub(String club) {
		this.club = club;
	}
	
	public String getData() {
		return data;
	}
	
	public void setData(String data) {
		this.data = data;
	}

	@Override
	public String toString() {
		if (name == null || name.equals(AthleteSummary.UNKNOWN_ATHLETE)) {
			return AthleteSummary.UNKNOWN_ATHLETE + " (" + String.valueOf(id) + ")";
		}
		else {
			return name;
		}
	}

}
